const db = uniCloud.database();
module.exports = {
	_before: function() { // 通用预处理器

	},
	async index() {
		
		let res = await db.collection("accompany-slides").where({
			stype: '0'
		}).get();
		
		let res2 = await db.collection("accompany-slides").where({
			stype: '1'
		}).get();
		
		let res3 = await db.collection("accompany-slides").where({
			stype: '2'
		}).get();
		
		let res4 = await db.collection("accompany-hospitals").get();
		
		const result = {
			slides: res.data,
			nav2s: res2.data,
			navs: res3.data,
			hospitals: res4.data
		};
		return result;
	}
}